<?php
require('src/Usuario.class.php');
$id = (isset($_GET['id'])) ? $_GET['id']:0;
$nombre     = "";
$apellido   = "";
$login      = "";
$pass       = "";
$email      = "";

if($id!=0){    
    $obj    = new Usuario();
    $res   = $obj->getConsulta($id);
    if( $row = mysql_fetch_array( $res ) ){
        $nombre     = $row["USU_NOMBRE"];
	$apellido   = $row["USU_APELLIDO"];
        $login      = $row["USU_LOGIN"];
        $pass       = $row["USU_PASSWORD"];
        $email      = $row["USU_EMAIL"];

    }
}
?>

<form id="formID" class="z-form " method="post" action="">
    <div class="clear"></div>
    <div class="row">
        <div class="cell">
            <label><span class="required">*</span>Nombre</label>
            <input name="nombre" class="validate[required, minSize[3],maxSize[40]] text-input meddium" type="text" id="nombre" value="<?php echo $nombre; ?>" />
        </div>
    </div>
    <div class="row">
        <div class="cell">
            <label><span class="required">*</span>Apellido</label>
            <input name="apellido" class="validate[required, minSize[3],maxSize[40] text-input meddium" type="text"  id="apellido" value="<?php echo $apellido ; ?>"/>
        </div> 
    </div>
    <div class="clear"></div>
    <div class="row">
        <div class="cell">
            <label><span class="required">*</span>Login</label>
            <input name="login" disabled="disabled" class="validate[required, minSize[4],maxSize[15]] text-input" type="text" id="login" value="<?php echo $login; ?>" />
        </div>
        <div class="cell">
            <label><span class="required">*</span>Password</label>
            <input name="pass" type="password" class="validate[required, minSize[6],maxSize[45], custom[integer]] text-input " id="pass" value="<?php echo $pass; ?>"/>
        </div> 
    </div>
    <div class="clear"></div>
    <div class="row">
        <div class="cell">
            <label><span class="required">*</span>Correo Electr&oacute;nico</label>
            <input name="email" class="validate[required, minSize[3],maxSize[45],custom[email]] text-input meddium" type="text"  id="email" value="<?php echo $email; ?>"/>
        </div>
    </div>   
</form>

